package cn.itcast.vo;

import java.util.List;

public class PageBean<T>
{
  private int pageCode;
  private int totalCount;
  private int pageSize;
  private List<T> beanList;
  
  public int getPageCode()
  {
    return this.pageCode;
  }
  
  public void setPageCode(int pageCode)
  {
    this.pageCode = pageCode;
  }
  
  public int getTotalPage()
  {
    int totalPage = this.totalCount / this.pageSize;
    if (this.totalCount % this.pageSize == 0) {
      return totalPage;
    }
    return totalPage + 1;
  }
  
  public int getTotalCount()
  {
    return this.totalCount;
  }
  
  public void setTotalCount(int totalCount)
  {
    this.totalCount = totalCount;
  }
  
  public int getPageSize()
  {
    return this.pageSize;
  }
  
  public void setPageSize(int pageSize)
  {
    this.pageSize = pageSize;
  }
  
  public List<T> getBeanList()
  {
    return this.beanList;
  }
  
  public void setBeanList(List<T> beanList)
  {
    this.beanList = beanList;
  }
}
